# Maintainer: Ariadne Conill <ariadne@dereferenced.org>
pkgname=fortune-alpine-tips
pkgver=20240826
pkgrel=0
pkgdesc="Tips for using the Alpine Linux system"
url="https://www.alpinelinux.org/"
arch="all"
license="MIT"
makedepends="fortune"
source="alpine-tips"
builddir="$srcdir/"
subpackages="$pkgname-profile:profile"

build() {
	strfile alpine-tips alpine-tips.dat
}

check() {
	fortune ./alpine-tips
}

package() {
	install -Dm644 ./alpine-tips "$pkgdir"/usr/share/fortune/alpine-tips
	install -Dm644 ./alpine-tips.dat "$pkgdir"/usr/share/fortune/alpine-tips.dat
}

profile() {
	depends="fortune"
	install -Dm644 ./alpine-tips.sh "$subpkgdir"/etc/profile.d/alpine-tips.sh
}

sha512sums="
5104cf408c6da6ad1e18f6daff074b5b78164d7eeee3a47a416be848795c662e666eaea4107a54d2714904c3996473c66c3bbdd476cc1d79c1df3e1794b9ed0c  alpine-tips
"
